home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 October / Macworld (1998-10).dmg / Shareware World / Info / For Developers / MacZoop 1.8.4 / More Classes / Streaming Classes / ZHandleStream.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-07  |  841 b   |  55 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************************
  2. *
  3. *
  4. *            MacZoop - "the framework for the rest of us"         
  5. *
  6. *
  7. *
  8. *            ZHandleStream.h        -- a stream using Handle storage
  9. *
  10. *
  11. *
  12. *
  13. *
  14. *            © 1998, Graham Cox
  15. *
  16. *
  17. *
  18. *
  19. *************************************************************************************************/
  20.  
  21.  
  22. #pragma once
  23.  
  24. #ifndef __ZHANDLESTREAM__
  25. #define    __ZHANDLESTREAM__
  26.  
  27. #include    "ZStream.h"
  28.  
  29.  
  30.  
  31. class    ZHandleStream    : public ZStream
  32. {
  33. protected:
  34.     Handle        h;
  35.     char        hState;
  36.     Boolean        ownsHandle;
  37.     
  38. public:
  39.  
  40.     ZHandleStream( Handle aHandle, Boolean becomeOwner = FALSE );
  41.     ZHandleStream();
  42.     
  43.     virtual     ~ZHandleStream();
  44.     
  45.     inline        Handle    GetHandle() { return h; };
  46.  
  47. protected:
  48.     virtual void    PutTo( void* data, long dataLen );
  49.     virtual void    GetFrom( void* data, long* dataLen );    
  50. };
  51.  
  52.  
  53.  
  54. #endif
  55.